package com.service;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

@Service
@RabbitListener(queues = "queue_2020_2_2")
public class MQlistenService2 {

    @RabbitHandler
    public void handlerMessage(String msg){
        System.out.println("队列收到了消息："+msg);
    }

}
